<template>
  <div>
    <a-switch
      checkedChildren="中文"
      unCheckedChildren="英文"
      v-model="checked"
      @change="onchange"
    />
    <div>{{ $t("china") }}</div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      checked: true,
    };
  },
  created() {},
  mounted() {},
  methods: {
    onchange(val) {
      console.log(val, this.$i18n.locale);
      this.$i18n.locale = val ? "zh_CN" : "en";
    },
  },
  components: {},
};
</script>
